package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/*课程表*/
public class TestCourse extends BaseEntity {

    private static final long serialVersionUID = 1L;
    @Excel(name = "课程序号", cellType = Excel.ColumnType.NUMERIC)
    private Long courseId;
    @Excel(name = "课程编码")
    private String courseCode;
    @Excel(name = "课程名称")
    private String courseName;
    @Excel(name = "课程排序")
    private Integer courseSort;
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;
    private boolean flag = false;

    public TestCourse() {
    }

    public Long getCourseId() {
        return courseId;
    }

    public void setCourseId(Long courseId) {
        this.courseId = courseId;
    }

    @NotBlank(message = "课程编码不能为空")
    @Size(min = 0, max = 64, message = "课程编码长度不能超过64个字符")
    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    @NotBlank(message = "课程名称不能为空")
    @Size(min = 0, max = 50, message = "课程名称长度不能超过50个字符")
    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public Integer getCourseSort() {
        return courseSort;
    }

    public void setCourseSort(Integer courseSort) {
        this.courseSort = courseSort;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    @Override
    public String toString() {
        return "TestCourse{" +
                "courseId=" + courseId +
                ", courseCode='" + courseCode + '\'' +
                ", courseName='" + courseName + '\'' +
                ", courseSort=" + courseSort +
                ", status='" + status + '\'' +
                ", flag=" + flag +
                '}';
    }

    public TestCourse(Long courseId, String courseCode, String courseName, Integer courseSort, String status, boolean flag) {
        this.courseId = courseId;
        this.courseCode = courseCode;
        this.courseName = courseName;
        this.courseSort = courseSort;
        this.status = status;
        this.flag = flag;
    }
}
